﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.Command.ControlTV.Entity
{
    /// <summary>
    /// 电视机（命令的接收者）
    /// </summary>
    public class TV
    {
        public int currentChannel = 0;
        /// <summary>
        /// 开机
        /// </summary>
        public void TurnOn()
        {
            Console.WriteLine("开机");
        }

        /// <summary>
        /// 关机
        /// </summary>
        public void TurnOff()
        {
            Console.WriteLine("关机");
        }

        /// <summary>
        /// 改变频道
        /// </summary>
        public void ChangeChannel(int channel)
        {
            currentChannel = channel;
            Console.WriteLine("改变频道");
        }
    }
}
